package org.jeecg.modules.bobo.common.config;

import com.upyun.RestManager;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: jeecg-boot-parent
 * @description: 又拍云配置
 * @author: 三千霜
 * @create: 2020-11-06 19:54
 */
@Configuration
public class UpyunConfig {

    @Value(value = "${jeecg.bizPath}")
    private String bizPath;
    @Value(value = "${jeecg.upyun.upyun_url}")
    private String upyunUrl;
    @Value(value = "${jeecg.upyun.upyun_name}")
    private String upyunName;
    @Value(value = "${jeecg.upyun.upyun_pass}")
    private String upyunPass;
    @Value(value = "${jeecg.upyun.bucketName}")
    private String bucketName;

    @Bean
    public RestManager upyunRestManager(){
        RestManager restManager = new RestManager(bucketName, upyunName, upyunPass);
        restManager.setTimeout(60);
        return restManager;
    }
}
